package com.yuanfeng.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.activity.dto.NoneGoodsUpdateDTO;
import com.yuanfeng.activity.entity.ActivityNoneGoodsEntity;
import com.yuanfeng.commoms.vo.goods.GoodsRecResultDetailVO;
import com.yuanfeng.commoms.vo.goods.NoneGoodsQueryDTO;
import com.yuanfeng.commoms.vo.goods.VoucherMessageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.yuanfeng.activity.entity.ActivityNoneGoods
 */
@Mapper
public interface ActivityNoneGoodsMapper extends BaseMapper<ActivityNoneGoodsEntity> {

    /**
     * 判断商品是否已存在
     * @param param
     * @return
     */
    Boolean checkGoodsIsExist(@Param("param") NoneGoodsUpdateDTO param);

    /**
     * 批量新增专区商品
     * @param noneBatchs
     */
    void insertNoneGoodsBatch(@Param("noneBatchs") List<NoneGoodsUpdateDTO> noneBatchs);

    /**
     * 批量修改专区商品
     * @param param
     */
    void updateNoneGoodsBatch(@Param("param") NoneGoodsUpdateDTO param);

    /**
     * 批量更新商品信息
     * @param param
     */
    void updateCornerBatch(@Param("param") NoneGoodsUpdateDTO param);

    /**
     * 分页查询专区商品
     * @param page
     * @param param
     * @return
     */
    IPage<GoodsRecResultDetailVO> selectNoneGoods(IPage<GoodsRecResultDetailVO> page , @Param("param") NoneGoodsQueryDTO param);

    /**
     *查询商品代金券
     * @param commonId
     * @return
     */
    List<VoucherMessageVO> selectVoucherMes(Integer commonId);
}




